package com.zmm.weblog.admin.controller;

import com.zmm.weblog.admin.model.vo.category.AddCategoryReqVo;
import com.zmm.weblog.admin.service.AdminFileService;
import com.zmm.weblog.common.aspect.ApiOperationLog;
import com.zmm.weblog.common.utils.Response;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

/**
 * @Author:福禄寿
 * @Date: 2024/5/9 下午2:17
 * @Des:weblog-springboot
 **/
@RestController
@RequestMapping("/admin/file")
@Api(tags = "Admin 文件模块")
public class AdminFileController {

    @Autowired
    private AdminFileService fileService;

    @PostMapping("/upload")
    @ApiOperation(value = "文件上传")
    @ApiOperationLog(description = "文件上传")
    public Response uploadFile(@RequestParam MultipartFile file){
        return fileService.uploadFile(file);
    }
}
